<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">
<ui:composition>
	<h:panelGrid style="margin: 0 auto;">
		<h:panelGroup>
			<h:form id="listagem">
				<h:dataTable value="#{acaoBean.lista}" var="acao"
					cellspacing="3" rendered="#{!empty acaoBean.lista}">
					<h:column>
						<f:facet name="header">Sigla</f:facet>
						<h:commandLink title="gráficos da ação">
							<f:ajax execute="@this" render=":listagem" />
							<h:outputText value="#{acao.sigla}" />
							<f:setPropertyActionListener target="#{acaoBean.acao}"
								value="#{acao}" />
						</h:commandLink>
					</h:column>
					<h:column>
						<f:facet name="header">Descrição</f:facet>
						<h:outputText value="#{acao.descricao}" />
					</h:column>
					
					<h:column>
						<f:facet name="header">Quantidade</f:facet>
						<h:outputText value="#{acao.quantidade}"
							style="text-align:right; display:block;" />
					</h:column>
					<h:column>
						<f:facet name="header">Valor de compra</f:facet>
						<h:outputText value="#{acao.valor_compra}"
							style="text-align:right; display:block;" />
					</h:column>
					
					<!-- <h:column>
						<f:facet name="header">Último Preço</f:facet>
						<h:outputText value="#{acaoVirtual.ultimoPreco}"
							style="text-align:right; display:block;">
							<f:convertNumber type="currency" />
						</h:outputText>
					</h:column>
					<h:column>
						<f:facet name="header">Total</f:facet>
						<h:outputText value="#{acaoVirtual.total}"
							style="text-align:right; display:block;">
							<f:convertNumber type="currency" />
						</h:outputText>
					</h:column>
				 <h:column>
						<h:commandLink title="editar">
							<f:ajax execute="@this"
								render=":edicao :listagem :graficosCarteira" />
							<h:graphicImage library="imagens" name="editar16.png" />
							<f:setPropertyActionListener target="#{acaoBean.selecionada}"
								value="#{acaoVirtual}" />
						</h:commandLink>
					</h:column>
					<h:column>
						<h:commandLink action="#{acaoBean.excluir}" title="excluir">
							<f:ajax execute="@this"
								render=":listagem :graficosCarteira :graficosAcao" />
							<h:graphicImage library="imagens" name="excluir16.png" />
							<f:setPropertyActionListener target="#{acaoBean.selecionada}"
								value="#{acaoVirtual}" />
						</h:commandLink>
					</h:column>-->
				</h:dataTable>
			</h:form>
		</h:panelGroup>
	</h:panelGrid>
</ui:composition>
</html>
